package src.com.doit.demo05;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class test {
    public static void main(String[] args) {
        System.out.println(sum(10,15,02,1531,1));

        int 啊= 1;
        System.out.println(啊+啊);

        List<String> list = new ArrayList<>();
        Collections.addAll(list,"sd","elz","cz");//Collections方法中的addAll可以将后面的可变参数都添加到list里面
        System.out.println(list);
    }
    public static int sum(int...a)
    {
        int sum = 0;
        for (int i : a) {
            sum+=i;
        }
        return sum;
    }
    public static Object method (Object...obj)
    {
        Object sum = 0 ;
        for (Object o : obj) {
            sum =o;
        }
        return sum;
    }
}
